home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!austern
- From: oliva@grande.dcc.unicamp.br (Alexandre Oliva)
- Newsgroups: comp.std.c++
- Subject: Re: Calling X(int) from X()'s init list
- Date: 27 Feb 1996 10:39:38 PST
- Organization: DCC - UNICAMP - Campinas, SP, Brazil
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <orohqliepi.fsf@grande.dcc.unicamp.br>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: 27 Feb 1996 01:18:17 -0300
- X-Newsreader: Gnus v5.1
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMTNQD0y4NqrwXLNJAQHj3wIAiMYybNyUGG6xBTIBuQK9iERRAd7FdzSR
- zvG+tgjlTRNCONssMYO3tf5N1XXvdiSaNVN2+g9sECLyfjpHg3Y97Q==
- =XvBy
- Originator: austern@isolde.mti.sgi.com
-
- Anders Lindback writes:
-
- > David Byrden <100101.2547@compuserve.com> wrote:
-
- >> Why is it not allowed to delegate the initialisation to another
- >> constructor?
-
- > Well, one could use a similar thing using a member function:
-
- > X (int i) { init(i); }
- > X () { init(34); }
-
- > where init is a member function for class X.
-
- Not if you have to initialize base classes or references, or member
- objects without default constructors.
- --
- Alexandre Oliva
- oliva@dcc.unicamp.br
- Universidade Estadual de Campinas, S~ao Paulo, Brasil
- ---
- [ comp.std.c++ is moderated. To submit articles: Try just posting with your
- newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
- comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
- Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-